package BanyuanClub.Work.Story.One;

public class Circle extends Shape {
    private double radius;

    public Circle(String color, int radius) {
        super(color);
        this.radius = radius;
    }

    @Override
    public double getArea() {
        return  3.14*radius*radius;
    }

    @Override
    public double getPer() {

        return 3.14*2*(radius+radius);
    }

    @Override
    public void showAll() {
        System.out.println("radius="+this.radius+",color+"+this.getColor()+
                ",Area="+this.getArea()+",per="+this.getPer());
    }
}
